<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      html,
      body {
        height: 100%;
        width: 100%;
      }

      .box {
        position: relative;
        margin: 0 auto;
        width: 300px;
        height: 300px;
      }

      .box > .smallBox,
      .box > .bigBox {
        position: relative;
        width: 200px;
        height: 200px;
        border: 1px solid #000;
        min-width: 200px;
        box-sizing: border-box;
      }
      .box > .smallBox > .mask {
        position: absolute;
        left: 0;
        top: 0;
        width: 100px;
        height: 100px;
        background-color: rgba(0, 0, 0, 0.5);
      }
      .box > .smallBox > img {
        width: 100%;
      }

      .box > .bigBox {
        /* display: none; */
        position: absolute;
        top: 0;
        left: 200px;
        overflow: hidden;
      }

      .box > .bigBox > img {
        /* width: 300%; */
        width: 200%;
      }

      .selectImg {
        display: flex;
        width: 200px;
        padding: 0;
        margin: 0;
      }

      .selectImg > li {
        list-style: none;
      }

      .selectImg > li > img {
        width: 50px;
        box-sizing: border-box;
        border: 1px solid transparent;
      }

      .selectImg > li > .active {
        border: 1px solid #000;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <!-- 小盒子 -->
      <div class="smallBox">
        <!-- 遮罩层 -->
        <div class="mask"></div>
        <!-- 小图 -->
        <img src="./img/cw1.png" alt="" />
      </div>

      <!-- 大盒子 -->
      <div class="bigBox">
        <!-- 大图 -->
        <img src="./img/cw1.png" alt="" />
      </div>

      <!-- 商品多角度图片 -->
      <ul class="selectImg">
        <!-- <img class="active" src="./images/cw1.png" alt="" srcset="" data-index="0">
        <img src="./images/cw2.png" alt="" srcset="" data-index="1">
        <img src="./images/cw3.png" alt="" srcset="" data-index="2">
        <img src="./images/cw4.png" alt="" srcset="" data-index="3"> -->

        <li>
          <img class="active" data-index="0" src="./img/cw1.png" alt="" />
        </li>
        <li>
          <img data-index="1" src="./img/cw2.png" alt="" />
        </li>
        <li>
          <img data-index="2" src="./img/cw3.png" alt="" />
        </li>
        <li>
          <img data-index="3" src="./img/cw4.png" alt="" />
        </li>
      </ul>
    </div>

    <script src="./index.js"></script>
  </body>
</html>
